<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" session="false"%>
<%@ page import="hiclib.CAuthenticate, hiclib.hicdata.CUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
	HttpSession ss = null;
	CUser user = null;
	ss = request.getSession(false); 
	if(ss == null) {
		response.sendRedirect("Login.jsp");
	} else {
		user = (CUser)ss.getAttribute("user");
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">

<title><%=user.comname %></title>
<link type="text/css" href="core/jquery/jquery-ui-1.8.18/css/ui-lightness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<link type="text/css" href="core/jquery/layout/css/layout-default-latest.css" rel="stylesheet" />
<link type="text/css" href="core/jquery/layout/css/layout-complex.css" rel="stylesheet" />
<script type="text/javascript" src="core/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="core/jquery/jquery-ui-1.8.18/js/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="core/jquery/layout/js/jquery.layout.min.js"></script>
<script type="text/javascript" src="portal/js/portal.js"></script>
</head>
<body>

<!--  상단  -->
<div class="ui-layout-north">
	<ul class="toolbar">
		<li id="tbarToggleNorth" class="first"><span></span>Toggle NORTH</li>
		<li id="tbarOpenSouth"><span></span>Open SOUTH</li>
		<li id="tbarCloseSouth"><span></span>Close SOUTH</li>
		<li id="tbarPinWest"><span></span>Pin/Unpin WEST</li>
		<li id="tbarPinEast" class="last"><span></span>Pin/Unpin EAST</li>
	</ul>
</div>
<!-- 왼쪽 -->
<div class="ui-layout-west">
	<div class="header">Outer - West - 1</div>
	<div class="content">
		<h3><b>Outer Layout - 1</b></h3>
	</div>
	<div class="footer">Automatically positioned footer - 1</div>
</div>
<!--  오른쪽  -->
<div class="ui-layout-east">
	<div class="header">Outer - East - 2</div>
	<div class="subhead">I'm a subheader - 2 </div>
	<div class="content">
		<h3><b>Inner Layout - 2</b></h3>
	</div>
	<div class="footer">I'm a footer</div>
	<div class="footer">I'm another footer</div>
	<div class="footer">Unlimited headers &amp; footers</div>
</div>
<!--   본문  -->
<div id="mainContent">
	<div class="ui-layout-content">
		<b>소속코드:<%=user.comcode %></b><br>
		<b>소속:<%=user.comname %></b><br>
		<b>사용자코드:<%=user.usrcode %></b><br>
		<b>사용자이름:<%=user.usrname %></b><br>
		<a href="Login.jsp">로그아웃</a>
		<a href="getStockList">재고</a>
	</div>
</div>
<!-- 하단  -->
<div class="ui-layout-south">
</div>
<script>
$(function() {
	// create the OUTER LAYOUT
	outerLayout = $("body").layout( layoutSettings_Outer );
	outerLayout.addToggleBtn( "#tbarToggleNorth", "north" );
	outerLayout.addOpenBtn( "#tbarOpenSouth", "south" );
	outerLayout.addCloseBtn( "#tbarCloseSouth", "south" );
	outerLayout.addPinBtn( "#tbarPinWest", "west" );
	outerLayout.addPinBtn( "#tbarPinEast", "east" );

	var westSelector = "body > .ui-layout-west"; // outer-west pane
	var eastSelector = "body > .ui-layout-east"; // outer-east pane

	 // CREATE SPANs for pin-buttons - using a generic class as identifiers

	$("<span></span>").addClass("pin-button").prependTo( westSelector );
	$("<span></span>").addClass("pin-button").prependTo( eastSelector );

	// BIND events to pin-buttons to make them functional
	outerLayout.addPinBtn( westSelector +" .pin-button", "west");
	outerLayout.addPinBtn( eastSelector +" .pin-button", "east" );

	 // CREATE SPANs for close-buttons - using unique IDs as identifiers
	$("<span></span>").attr("id", "west-closer" ).prependTo( westSelector );
	$("<span></span>").attr("id", "east-closer").prependTo( eastSelector );
	// BIND layout events to close-buttons to make them functional
	outerLayout.addCloseBtn("#west-closer", "west");
	outerLayout.addCloseBtn("#east-closer", "east");
});
</script>
</body>
<% } %>
</html>